{% extends "templates/base.phtml" %}
{% block content %}
<div class="page-content-wrap">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">我的应用</h3>

                        <div class="btn-group pull-right">
                            <a class="btn btn-success" href="/admin/app/"><i class="fa fa-plus"></i> 添加应用</a>
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            {% for userapp in appuser %}
                            {%if userapp.getApp().del!=1%}
                            <div class="form-horizontal col-md-12 app-wrap">
                                <div class="col-md-2 col-sm-2 app-img">
                                    <img src="{{userapp.getApp().pic}}"/>
                                </div>
                                <div class="col-md-3 app-name">
                                    <h3>{{userapp.getApp().appname}}</h3>
                                </div>
                                <div class="col-md-4 out_time">
                                    <p>过期时间：{{userapp.end}}</p>
                                </div>
                                <div class="col-md-2 app_entry">
                                    {%if userapp.getApp().out == 1 %}
                                    <a class="btn btn-info" href="/admin/appmain/index/{{userapp.getApp().action}}">进入应用</a>
                                    {%else%}
                                    <a class="btn btn-info" href="/admin/app{{userapp.getApp().action}}/">进入应用</a>
                                    {%endif%}
                                </div>
                            </div>
                            <hr/>
                            {%endif%}
                            {% endfor %}
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{%endblock%}
{%block end%}
<style type="text/css">
    .app-wrap {
        padding: 5px 0px;
        border-bottom: 1px solid #E5E5E5;
    }

    .app-name, .out_time, .app_entry, .app-del {
        padding-top: 30px;
    }
</style>
{%endblock%}